﻿using System;
using SharpSqlAnalyzer.stmt;

namespace SharpSqlAnalyzer.nodes
{
	// Token: 0x02000311 RID: 785
	public class TMultiTarget : TParseTreeNode
	{
		// Token: 0x17000664 RID: 1636
		// (get) Token: 0x06001BDD RID: 7133 RVA: 0x0032FCC2 File Offset: 0x0032DEC2
		// (set) Token: 0x06001BDE RID: 7134 RVA: 0x0032FCCA File Offset: 0x0032DECA
		public virtual TResultColumnList ColumnList
		{
			get
			{
				return this.columnList;
			}
			set
			{
				this.columnList = value;
			}
		}

		// Token: 0x17000665 RID: 1637
		// (get) Token: 0x06001BDF RID: 7135 RVA: 0x0032FCD3 File Offset: 0x0032DED3
		// (set) Token: 0x06001BE0 RID: 7136 RVA: 0x0032FCDB File Offset: 0x0032DEDB
		public virtual TSelectSqlStatement SubQuery
		{
			get
			{
				return this.subQuery;
			}
			set
			{
				this.subQuery = value;
			}
		}

		// Token: 0x06001BE1 RID: 7137 RVA: 0x0032FCE4 File Offset: 0x0032DEE4
		public override void init(object arg1)
		{
			if (arg1 is TSelectSqlNode)
			{
				this.subQueryNode = (TSelectSqlNode)arg1;
				return;
			}
			if (arg1 is TResultColumnList)
			{
				this.columnList = (TResultColumnList)arg1;
			}
		}

		// Token: 0x06001BE2 RID: 7138 RVA: 0x0032FD10 File Offset: 0x0032DF10
		public override void doParse(TCustomSqlStatement psql, ESqlClause plocation)
		{
			if (this.subQueryNode != null)
			{
				if (this.subQuery == null)
				{
					this.subQuery = new TSelectSqlStatement(psql.dbvendor);
					this.subQuery.rootNode = this.subQueryNode;
				}
				this.subQuery.doParseStatement(psql);
				return;
			}
			if (this.columnList != null)
			{
				this.columnList.doParse(psql, plocation);
			}
		}

		// Token: 0x06001BE3 RID: 7139 RVA: 0x0032FD72 File Offset: 0x0032DF72
		public override void accept(TParseTreeVisitor v)
		{
			v.preVisit(this);
			v.postVisit(this);
		}

		// Token: 0x06001BE4 RID: 7140 RVA: 0x0032FD82 File Offset: 0x0032DF82
		public override void acceptChildren(TParseTreeVisitor v)
		{
			v.preVisit(this);
			if (this.subQuery != null)
			{
				this.subQuery.acceptChildren(v);
			}
			if (this.columnList != null)
			{
				this.columnList.acceptChildren(v);
			}
			v.postVisit(this);
		}

		// Token: 0x04001A1C RID: 6684
		private TSelectSqlNode subQueryNode;

		// Token: 0x04001A1D RID: 6685
		private TSelectSqlStatement subQuery;

		// Token: 0x04001A1E RID: 6686
		private TResultColumnList columnList;
	}
}
